package modelo;

import org.hibernate.HibernateException;
import org.hibernate.Session;

import entities.FacturaEntity;
import entities.SolicitudInsumoEntity;
import hbt.AbstractHibernateManager;

public class SolInsumosDao extends AbstractHibernateManager {

			
			public void save (SolicitudInsumoEntity solinsu){
				Session s = null;
				try {
					s=getNewSession();
					s.beginTransaction();
					s.persist(solinsu);
					s.flush();
					s.getTransaction().commit();
					System.out.println("[SolicitudInsumos SAVED ON TABLE SolicitudInsumos y ItemsInsumos]::OK");
				} catch (HibernateException e) {
					e.printStackTrace();
				} finally{
					closeSession(s);
				}
			}
}
